#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
//    connect(ui->pushButton_Reject, &Widget::mouseMoveEvent, this, &Widget::on_pushButton_Reject_mouseMoveEvent);
}

Widget::~Widget()
{
    delete ui;
}



void Widget::on_pushButton_Accept_clicked()
{
    ui->label->setText("来来来，嘴一个，肏你！");
}

void Widget::on_pushButton_Reject_clicked()
{

}

void Widget::on_pushButton_Reject_pressed()
{
    int width = this->geometry().width();
    int heigth = this->geometry().height();

    int x = rand() % width;
    int y = rand() % heigth;

    ui->pushButton_Reject->move(x, y);
}

void Widget::on_pushButton_Reject_mouseMoveEvent()
{
//    int width = ui->pushButton_Reject->geometry().width();
//    int height = ui->pushButton_Reject->geometry().height();

//    int x= rand() % width;
//    int y = rand() % height;

//    ui->pushButton_Reject->move(x, y);
}



